﻿using PageAdmin.Utils.ORM;
using System;
/// <summary>
/// 获取内容数据接口
/// </summary>
namespace PageAdmin.Utils.BLL
{
    /// <summary>
    /// 根据id获取内容页数据接口
    /// </summary>
    public interface IGetDetailData<T> where T : class, new()
    {
        /// <summary>
        /// 
        /// </summary>
        Action<T> Executed{ get; set; }

        /// <summary>
        /// 根据id获取实体。
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetData(int id);

        /// <summary>
        /// 根据条件，排序和参数获取实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetData(string condition, string orderBy,object dbParameters = null);

    }
}